
#ifndef __CE_SOLVERMANAGER_H__
#define __CE_SOLVERMANAGER_H__

#include <export.h>
#include <iobject.h>
#include <map>
#include <string>

struct iLevelOfDetailSolver;

/**
 * \addtogroup engine
 * @{
 */

/**
 * @brief Manager holding level of detail solver
 */
class CE_API ceSolverManager : public iObject
{
  CE_OBJECT
private:
  ceSolverManager();
  virtual ~ceSolverManager();

  static ceSolverManager* static_instance;

  std::map<std::string, iLevelOfDetailSolver*>  _solvers;

  iLevelOfDetailSolver                          *_defaultEffectSolver;


public:

  static ceSolverManager* Get ();
  static ceSolverManager* Reset (ceSolverManager* solverManager = 0);


	void AddSolver (const std::string& name, iLevelOfDetailSolver* solver);
  iLevelOfDetailSolver *GetSolver (const std::string& name);
  const iLevelOfDetailSolver *GetSolver (const std::string& name) const;

  void SetDefaultEffectSolver (iLevelOfDetailSolver *solver);
  iLevelOfDetailSolver *GetDefaultEffectSolver () const;

};

/** @} */

#endif /* ! __CE_SOLVERMANAGER_H__ */

